/**
 * 
 */
package fb.chatter.control.cloner;

import javafx.scene.layout.AnchorPane;

/**
 * @author Horizon
 *
 */
public class AnchorPaneCloner {
	
	public AnchorPane clone(AnchorPane anchorPane, String newId){
		
		// <AnchorPane id="" fx:id="acpFriend" prefHeight="102.0" prefWidth="203.0">
		// <AnchorPane id="" fx:id="acpFriend" prefHeight="102.0" prefWidth="202.0" styleClass="friendAnchorPane">
		AnchorPane pane = new AnchorPane();
		pane.setPrefHeight(anchorPane.getPrefHeight());
		pane.setPrefWidth(anchorPane.getPrefWidth());
		pane.getStyleClass().addAll(anchorPane.getStyleClass());
		pane.setId(newId);
		return pane;
	}
}
